package pt.mauromad.guias.refdata.mesure;

import pt.mauromad.guias.utils.EnumUtils;
import pt.mauromad.guias.utils.generic.EnumDao;

public enum Measure implements EnumDao<Measure> {
	//@formatter:off
	UNIT(1), 
	MILLIGRAMS(2), GRAMS(3), KILOS(4), TONS(5),
	MILLILITTERS(6), LITTERS(7)
	;
	//@formatter:on

	private final long id;

	private Measure(long id) {
		this.id = id;
	}

	@Override
	public long getId() {
		return id;
	}

	@Override
	public String getDescription() {
		return name();
	}

	public static Measure byId(long id) {
		return EnumUtils.byId(id, values());
	}
}
